package com.dkd.record.mapper;

import java.util.List;
import com.dkd.record.domain.Record;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * 打本记录Mapper接口
 * 
 * @author ruyi
 * @date 2024-11-08
 */
public interface RecordMapper 
{
    /**
     * 查询打本记录
     * 
     * @param playId 打本记录主键
     * @return 打本记录
     */
    public Record selectRecordByPlayId(Long playId);

    /**
     * 查询打本记录列表
     * 
     * @param record 打本记录
     * @return 打本记录集合
     */
    public List<Record> selectRecordList(Record record);

    /**
     * 新增打本记录
     * 
     * @param record 打本记录
     * @return 结果
     */
    public int insertRecord(Record record);

    /**
     * 修改打本记录
     * 
     * @param record 打本记录
     * @return 结果
     */
    public int updateRecord(Record record);

    /**
     * 删除打本记录
     * 
     * @param playId 打本记录主键
     * @return 结果
     */
    public int deleteRecordByPlayId(Long playId);

    /**
     * 批量删除打本记录
     * 
     * @param playIds 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteRecordByPlayIds(Long[] playIds);

    @Select(value = "select  * from p_t_record where play_time between #{start} and #{end}")
    List<Record> getCountNum(@Param("start") String start, @Param("end")String end);
}
